package cn.wizzer.app.crown.modules.models;

import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.integration.json4excel.annotation.J4EIgnore;

import java.math.BigDecimal;

/**
 * 观点-标签
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table("crown_view_point_label")
@TableIndexes({@Index(name = "index_userId_delFlag", fields = {"userId", "delFlag"}, unique = false)})
public class CrownViewPointLabel extends BaseModel {
    @Column
    @Name
    @Comment("ID")
    @J4EIgnore
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;

    @Column
    @Comment()
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String userId;

    @Column
    @Comment("last最近/all总胜/series连胜")
    @Default("last")
    @ColDefine(type = ColType.VARCHAR,width = 16)
    private String type;


    @Column
    @Comment("观点数量-(类型与时间条件进行统计)")
    @ColDefine(type = ColType.INT)
    private int matchCount;


    @Column
    @Comment("胜场")
    @ColDefine(type = ColType.INT)
    private int winCount;


    @Column()
    @Comment("回报率")
    @ColDefine(type=ColType.FLOAT, width=16, precision=6)
    private BigDecimal totalOdds;

}
